package net.maku.qdd.convert;

import net.maku.qdd.entity.GoodsEntity;
import net.maku.qdd.vo.GoodsVO;
import net.maku.qdd.vo.GoodsExcelVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 商品
 *
 * @author MAKU babamu@126.com
 * <a href="https://maku.net">MAKU</a>
 */
@Mapper
public interface GoodsConvert {
    GoodsConvert INSTANCE = Mappers.getMapper(GoodsConvert.class);

    GoodsEntity convert(GoodsVO vo);

    GoodsVO convert(GoodsEntity entity);

    List<GoodsVO> convertList(List<GoodsEntity> list);

    List<GoodsEntity> convertList2(List<GoodsVO> list);

    GoodsExcelVO convertToExcel(GoodsEntity entity);

    List<GoodsExcelVO> convertExcelList(List<GoodsEntity> list);

    GoodsEntity convertFromExcel(GoodsExcelVO excelVO);

    List<GoodsEntity> convertExcelList2(List<GoodsExcelVO> list);
}